package com.jueling.culture.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author linp
 * @date 2022/02/18
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "USER_AUTHORITY")
public class UserAuthority {
    /**
     * 用户id
     */
    @Id
    @Column(name = "user_id")
    private String userId;

    /**
     * 权限编码
     */
    @Column(name = "authority_code")
    @JsonProperty(value = "code")
    private String authorityCode;

    /**
     * 权限：edit-编辑权限，view-查看权限
     */
    private String permissions;
}